package com.rich.house.controller;

import com.rich.common.dto.house.Result;
import com.rich.house.service.HouseAuditTestService;
import com.rich.house.vo.AuditVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: guofeng
 * @Date: 2021/09/05/18:59
 * @Description:
 */
@RestController
public class HouseAuditTestController {

    @Autowired
    private HouseAuditTestService houseAuditTestService;

    @RequestMapping("/test/select")
    @PreAuthorize("hasAuthority('select')")
    public List<AuditVo> findAll(@RequestBody AuditVo auditVo) {
        return houseAuditTestService.findAll(auditVo);
    }

    @RequestMapping("/test/add")
    @PreAuthorize("hasAuthority('add')")
    public Result add() {
        return new Result("添加成功");
    }
}
